package com.eling.elcms.travel.model;

import com.eling.elcms.core.dao.annotation.CriteriaEnhancer;
import com.eling.elcms.core.dao.annotation.CriteriaEnhancers;
import com.eling.elcms.core.dao.hibernate.OrderCriteriaEnhancer;
import com.eling.elcms.core.model.BaseModel;
import org.hibernate.search.annotations.DocumentId;
import org.hibernate.search.annotations.Field;
import org.hibernate.search.annotations.Indexed;

import javax.persistence.*;

@Entity
@Table(name = "fp_approvalruleregister")
@Indexed
@CriteriaEnhancers(criteriaEnhancers = { @CriteriaEnhancer(impl = OrderCriteriaEnhancer.class) })
public class ApprovalRuleRegister extends BaseModel {

	private static final long serialVersionUID = 8260361754356556210L;
	
	@Id
	@DocumentId
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private Long pkApprovalRuleRegister;

	@Column
	@Field
	private String code;

	@Column
	@Field
	private String name;
	
	@Column
	@Field
	private String paramName;

	@Column
	@Field
	private String ruleClass;

	@Version
	private Integer version;
	
	
	public ApprovalRuleRegister(String ruleClass) {
		this.ruleClass =ruleClass;
	}
	
	public ApprovalRuleRegister() {
	}

	public Long getPkApprovalRuleRegister() {
		return pkApprovalRuleRegister;
	}

	public void setPkApprovalRuleRegister(Long pkApprovalRuleRegister) {
		this.pkApprovalRuleRegister = pkApprovalRuleRegister;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getRuleClass() {
		return ruleClass;
	}

	public void setRuleClass(String ruleClass) {
		this.ruleClass = ruleClass;
	}

	public String getParamName() {
		return paramName;
	}

	public void setParamName(String paramName) {
		this.paramName = paramName;
	}

	public Integer getVersion() {
		return version;
	}

	public void setVersion(Integer version) {
		this.version = version;
	}
}
